package org.example.controller;

import org.example.config.R;
import org.example.domain.CropWork;
import org.example.service.CropWorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("cropWork")
@RestController
public class CropWorkController {
    @Autowired
    CropWorkService cropWorkService;

    @RequestMapping("list")
    public R list(){
        List<CropWork> list=cropWorkService.list();
        return R.successed(list);
    }
}
